using Godot;
using System;
using CurrentGame.Utils.Interpolation;

public partial class PlayerLightStack : Node2D
{

	private LerpInterpolation _interpolation;

	public PlayerLightStack()
	{
        _interpolation = new(0.01f, new Vector3(0.001f, -1f, -1f))
        {
            Value = 1.0f,
            Weight = 0.2f
        };
		_interpolation.Teleport();
    }

	public void SetStackScale(float scale)
	{
		_interpolation.Value = scale;
	}

	public void SetInterpolationWeight(float weight)
	{
		_interpolation.Weight = weight;
	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
		if (_interpolation.Process(delta))
		{
			Scale = new Vector2(_interpolation.Value, _interpolation.Value);
		}
	}
}
